import type { CaseAmount, CaseDetail, CaseInfo } from './types/case'
import { http } from '@/http/alova'

export function submitCase(caseInfo?: CaseInfo) {
  return http.Post<boolean>('/api/v1/case/submit', {
    ...caseInfo,
  })
}
export function fetchCaseAmount() {
  return http.Post<CaseAmount>('/api/v1/case/case-amount')
}
export function fetchMyMandateList() {
  return http.Post<CaseDetail[]>('/api/v1/lawyer-case/mine-curt')
}
export function submitQuestion(caseDetail?: CaseDetail) {
  return http.Post<boolean>('/api/v1/case/submit_question', {
    ...caseDetail,
  })
}
